import 'package:fate_blind_box/theme/theme_color.dart';
import 'package:flutter/material.dart';

class FateFailUi extends StatelessWidget {
  const FateFailUi({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Dialog(
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(8)
      ),
      elevation: 0,
      backgroundColor: Colors.white,
      child: SizedBox(
        height: 330,
        child: dialogContent(context),
      ),
    );
  }

  dialogContent(BuildContext context) {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.center,
      children: [
        ClipRRect(
          borderRadius: const BorderRadius.vertical(top: Radius.circular(8)),
          child: Image.network(
            "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F01a1f65d397d63a8012187f4f54217.jpg%401280w_1l_2o_100sh.jpg&refer=http%3A%2F%2Fimg.zcool.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1656774758&t=bc0fd8604234aaef61178774da711d06",
            fit: BoxFit.cover,
            height: 154,
          ),
        ),
        Container(
          margin: const EdgeInsets.only(top: 16),
          child: Text(
            "很遗憾！",
            style: TextStyle(
              color: ThemeColor.textColor,
              fontSize: 18
            ),
          ),
        ),
        Container(
          margin: const EdgeInsets.only(top: 8),
          child: Text(
            "您牵手失败",
            style: TextStyle(
              color: ThemeColor.textColorSecond,
              fontSize: 14
            ),
          ),
        ),
        Container(
          margin: const EdgeInsets.all(30),
          height: 40,
          decoration: ShapeDecoration(
            shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(24)),
            color: ThemeColor.mainColor
          ),
          alignment: Alignment.center,
          child: GestureDetector(
            onTap: () {
              Navigator.of(context).pop();
            },
            child: const Text(
              "我知道了",
              style: TextStyle(
                color: Colors.white,
                fontSize: 12
              ),
            ),
          ),
        )
      ],
    );
  }
}